<script setup lang="ts">
import BasicLayout from '@/layouts/BasicLayout.vue'
import zhCN from 'ant-design-vue/es/locale/zh_CN';
import dayjs from 'dayjs';
import 'dayjs/locale/zh-cn';
import { useRoute } from 'vue-router'
import { setLocalCache } from '@/utils/LocalStorageUtils'

dayjs.locale('zh-cn');
const locale = zhCN
const route = useRoute()

//引导token
const STORAGE_KEY = 'welcome_guide_shown'
//每次刷新页面都设置引导为false
setLocalCache(STORAGE_KEY, true)
</script>

<template>
  <a-config-provider :locale="locale">
    <div id="app">
      <div
        v-if="
          route.path.startsWith('/user') ||
          route.path.startsWith('/api') ||
          route.path.startsWith('/loading') ||
          route.path.startsWith('/admin/login') ||
          route.path.startsWith('/recruiter/login') ||
          route.path.startsWith('/recruiter/register')
        "
      >
        <router-view />
      </div>
      <div v-else>
        <BasicLayout />
      </div>
    </div>
  </a-config-provider>
</template>

<style>
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
}

#app {
  height: 100vh;
  overflow: hidden;
}
</style>
